package po.record;
/**
 * 文档使用记录
 * @author admin
 */

import java.time.LocalDateTime;

import po.emp.Empoyee;

public class UseDocRecord {
	private int useId;
	private Empoyee useEmp;     //使用人
	private LocalDateTime useStartTime; //开始使用时间
	private LocalDateTime useEndTime;   //结束使用时间
	private Document doc;   //使用的文档
	
	public UseDocRecord() {
		super();
	}

	public UseDocRecord(int useId, Empoyee useEmp, LocalDateTime useStartTime, LocalDateTime useEndTime, Document doc) {
		super();
		this.useId = useId;
		this.useEmp = useEmp;
		this.useStartTime = useStartTime;
		this.useEndTime = useEndTime;
		this.doc = doc;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((doc == null) ? 0 : doc.hashCode());
		result = prime * result + ((useEmp == null) ? 0 : useEmp.hashCode());
		result = prime * result + ((useEndTime == null) ? 0 : useEndTime.hashCode());
		result = prime * result + useId;
		result = prime * result + ((useStartTime == null) ? 0 : useStartTime.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UseDocRecord other = (UseDocRecord) obj;
		if (doc == null) {
			if (other.doc != null)
				return false;
		} else if (!doc.equals(other.doc))
			return false;
		if (useEmp == null) {
			if (other.useEmp != null)
				return false;
		} else if (!useEmp.equals(other.useEmp))
			return false;
		if (useEndTime == null) {
			if (other.useEndTime != null)
				return false;
		} else if (!useEndTime.equals(other.useEndTime))
			return false;
		if (useId != other.useId)
			return false;
		if (useStartTime == null) {
			if (other.useStartTime != null)
				return false;
		} else if (!useStartTime.equals(other.useStartTime))
			return false;
		return true;
	}

	public int getUseId() {
		return useId;
	}

	public void setUseId(int useId) {
		this.useId = useId;
	}

	public Empoyee getUseEmp() {
		return useEmp;
	}

	public void setUseEmp(Empoyee useEmp) {
		this.useEmp = useEmp;
	}

	public LocalDateTime getUseStartTime() {
		return useStartTime;
	}

	public void setUseStartTime(LocalDateTime useStartTime) {
		this.useStartTime = useStartTime;
	}

	public LocalDateTime getUseEndTime() {
		return useEndTime;
	}

	public void setUseEndTime(LocalDateTime useEndTime) {
		this.useEndTime = useEndTime;
	}

	public Document getDoc() {
		return doc;
	}

	public void setDoc(Document doc) {
		this.doc = doc;
	}

	@Override
	public String toString() {
		return "UseDocRecord [useId=" + useId + ", useEmp=" + useEmp + ", useStartTime=" + useStartTime
				+ ", useEndTime=" + useEndTime + ", doc=" + doc + "]";
	}
	
	
	
}
